/**
 * 
 */
package com.wisdytech.linkdcs.energy.service.impl;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.wisdytech.common.handler.BaseService;
import com.wisdytech.linkdcs.energy.dao.IEqEnergyRecordDao;
import com.wisdytech.linkdcs.energy.model.EquipmentEnergyRecord;
import com.wisdytech.linkdcs.energy.service.IEquipmentEnergyAnalysisService;

/**
 * <p>
 * ClassName: EquipmentEnergyAnalysisServiceImpl
 * </p>
 * <p>
 * Description: 设备能耗分析业务层实现类
 * </p>
 * <p>
 * Author: kongming
 * </p>
 * <p>
 * Date: 2017-10-23
 * </p>
 */
@Service("equipmentEnergyAnalysisService")
@Transactional
public class EquipmentEnergyAnalysisServiceImpl extends BaseService<IEqEnergyRecordDao, EquipmentEnergyRecord> implements IEquipmentEnergyAnalysisService{
    /**
     * 注入设备能耗dao
     */
    @Resource
    private IEqEnergyRecordDao energyRecordDao;
    @Override
    public List<EquipmentEnergyRecord> getColumn(String code, String startTime, String endTime, String operationId) {
        Map<String, Object> queryMap = new HashMap<String, Object>();
        queryMap.put("code", code);
        queryMap.put("startTime", startTime);
        queryMap.put("endTime", endTime);
        queryMap.put("operationId", operationId);
        List<EquipmentEnergyRecord> lists = energyRecordDao.getColumn(queryMap);
        return lists;
    }
    @Override
    public List<EquipmentEnergyRecord> getWaterPieRate(String code, String startTime, String endTime, String operationId) {
        Map<String, Object> queryMap = new HashMap<String, Object>();
        queryMap.put("code", code);
        queryMap.put("startTime", startTime);
        queryMap.put("endTime", endTime);
        queryMap.put("operationId", operationId);
        List<EquipmentEnergyRecord> lists = energyRecordDao.getWaterPieRate(queryMap);
        return lists;
    }
    @Override
    public List<EquipmentEnergyRecord> getElectricPieRate(String code, String startTime, String endTime,
            String operationId) {
        Map<String, Object> queryMap = new HashMap<String, Object>();
        queryMap.put("code", code);
        queryMap.put("startTime", startTime);
        queryMap.put("endTime", endTime);
        queryMap.put("operationId", operationId);
        List<EquipmentEnergyRecord> lists = energyRecordDao.getElectricPieRate(queryMap);
        return lists;
    }
    @Override
    public List<EquipmentEnergyRecord> getElectricLineColumn(String code, String startTime, String endTime,
            String operationId) {
        Map<String, Object> queryMap = new HashMap<String, Object>();
        queryMap.put("code", code);
        queryMap.put("startTime", startTime);
        queryMap.put("endTime", endTime);
        queryMap.put("operationId", operationId);
        List<EquipmentEnergyRecord> lists = energyRecordDao.getElectricLineColumn(queryMap);
        return lists;
    }
    @Override
    public List<EquipmentEnergyRecord> getWaterLineColumn(String code, String startTime, String endTime,
            String operationId) {
        Map<String, Object> queryMap = new HashMap<String, Object>();
        queryMap.put("code", code);
        queryMap.put("startTime", startTime);
        queryMap.put("endTime", endTime);
        queryMap.put("operationId", operationId);
        List<EquipmentEnergyRecord> lists = energyRecordDao.getWaterLineColumn(queryMap);
        return lists;
    }
    
}
